/**
 * @file  list.h
 * @brief  linked list control header file
 *
 * @date   2011/04/23
 * @author K.Akasaka
 */

#ifndef LIST_H_
#define LIST_H_

#include "types.h"

/**\struct _LIST_ITEM
 * @brief list item for generic list.
 */
/**\var     LIST_ITEM
 * @brief list item for generic list.
 *        alias of struct _LIST_ITEM
 */
typedef struct _LIST_ITEM
{
	/**  own type pointer for linked list */
	struct _LIST_ITEM *next;
	/**  linked list load and id */
	void *load;
} LIST_ITEM;

/*
 * generic list control functions
 */
LIST_ITEM *popFromList(LIST_ITEM **lst);
LIST_ITEM *pushToList(LIST_ITEM **lst, LIST_ITEM *itm);
LIST_ITEM *searchInList(LIST_ITEM **lst, void *load);
LIST_ITEM *deleteFromList(LIST_ITEM **lst, LIST_ITEM *tgt);
WORD lengthOf(LIST_ITEM **lst);

#endif /* LIST_H_ */
